﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MyMaster.master" AutoEventWireup="true" CodeFile="TinTuc.aspx.cs" Inherits="TinTuc" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div style="margin:10px 25px 0px 25px;">
        <label style="font-size:20px; margin-left:5px;"><b>Tin tức công nghệ</b></label>
        <asp:SqlDataSource ID="sql_tintuc" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                            SelectCommand="SELECT TOP 10 * FROM tintuc">
        </asp:SqlDataSource>
        <asp:DataList ID="datalistTinTuc" runat="server" DataKeyField="id_row" 
            DataSourceID="sql_tintuc" RepeatColumns="2">
            <ItemTemplate>
                <table width="350px" style="margin-top:15px;">
                    <tr>
                        <td style="text-align:center; height:120px">
                            <asp:Image ID="imgHinhAnh" runat="server" Height="110px" Width="300px" 
                                ImageUrl='<%# "~/images/TinTuc/" + Eval("id_row") + "/hinhchude.jpg" %>' />
                            </td>
                        </tr>
                    <tr>
                        <td style="text-align:center">
                            <asp:HyperLink ID="hyp_tintuc" runat="server" ForeColor="Black" 
                                NavigateUrl='<%# "~/TinTucChiTiet.aspx?id_row=" + Eval("id_row")%>' Text='<%# Eval("tieude") %>' />
                        </td>
                    </tr>
                </table>
            </ItemTemplate>
        </asp:DataList>
    </div>    
</asp:Content>

